package top.atluofu.luofuecommerce.order.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import top.atluofu.luofuecommerce.order.interceptor.LoginUserInterceptor;

/**
 * @ClassName: OrderWebConfiguration
 * @description: TODO
 * @author: 有罗敷的马同学
 * @datetime: 2022Year-11Month-25Day-10:25
 * @Version: 1.0
 */
@Configuration
public class OrderWebConfiguration implements WebMvcConfigurer {

    @Autowired
    LoginUserInterceptor interceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(interceptor).addPathPatterns("/**");
    }
}